#!/bin/sh

# 创建链
iptables -t nat -N CHGIP_2

# 清空链
iptables -t nat -F CHGIP_2

# 添加转向
iptables -t nat -A CHGIP_2 -m mark --mark 0 -j NFQUEUE --queue-num 8800

iptables -t nat -A CHGIP_2 -m mark --mark 1 -j SNAT --to-source 59.61.92.146
iptables -t nat -A CHGIP_2 -m mark --mark 2 -j SNAT --to-source 59.61.92.147
iptables -t nat -A CHGIP_2 -m mark --mark 3 -j SNAT --to-source 59.61.92.148
iptables -t nat -A CHGIP_2 -m mark --mark 4 -j SNAT --to-source 59.61.92.149
#iptables -t nat -A CHGIP_2 -j MARK --set-mark 0

# 添加到主链
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -p tcp -s 59.61.92.145/29 -m state --state NEW,ESTABLISHED  -j CHGIP_2

